from scrapy.cmdline import execute
import sys
import os
#引入当前工程目录的顶级目录
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
execute(['scrapy','crawl','lagou'])